package joe.works.commons.daoimpl.sqlmap;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import joe.works.commons.IDataLoader;

public class ListLoader<Type> extends SqlMapClientDaoSupport implements IDataLoader<List<Type>> {

	private String sqlName;
	
	public void setSqlName(String sqlName) {
		this.sqlName = sqlName;
	}
	
	@SuppressWarnings("unchecked")
	public List<Type> loadData() {
		return getSqlMapClientTemplate().queryForList(sqlName);
	}
 
}
